home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / SCSI.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  50.5 KB  |  1,028 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        SCSI.a
  3. ;
  4. ;    Contains:    SCSI Family Interfaces.
  5. ;
  6. ;    Version:    Technology:    SCSI 4.3
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1986-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__SCSI__') = 'UNDEFINED' THEN
  19. __SCSI__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  25.     include 'MixedMode.a'
  26.     ENDIF
  27.  
  28. ;  SCSI Manager errors. These are generated by Inside Mac IV calls only. 
  29.  
  30. scCommErr                        EQU        2                    ; communications error, operation timeout 
  31. scArbNBErr                        EQU        3                    ; arbitration timeout waiting for not BSY 
  32. scBadParmsErr                    EQU        4                    ; bad parameter or TIB opcode 
  33. scPhaseErr                        EQU        5                    ; SCSI bus not in correct phase for attempted operation 
  34. scCompareErr                    EQU        6                    ; data compare error 
  35. scMgrBusyErr                    EQU        7                    ; SCSI Manager busy  
  36. scSequenceErr                    EQU        8                    ; attempted operation is out of sequence 
  37. scBusTOErr                        EQU        9                    ; CPU bus timeout 
  38. scComplPhaseErr                    EQU        10                    ; SCSI bus wasn't in Status phase 
  39. ;  TIB opcodes 
  40.  
  41. scInc                            EQU        1
  42. scNoInc                            EQU        2
  43. scAdd                            EQU        3
  44. scMove                            EQU        4
  45. scLoop                            EQU        5
  46. scNop                            EQU        6
  47. scStop                            EQU        7
  48. scComp                            EQU        8
  49. ;  Signatures 
  50.  
  51. sbSIGWord                        EQU        $4552                ; signature word for Block 0 ('ER') 
  52. sbMac                            EQU        1                    ; system type for Mac 
  53. pMapSIG                            EQU        $504D                ; partition map signature ('PM') 
  54. pdSigWord                        EQU        $5453
  55.  
  56. oldPMSigWord                    EQU        $5453
  57. newPMSigWord                    EQU        $504D
  58. ;  Driver Descriptor Map 
  59. Block0                    RECORD 0
  60. sbSig                     ds.w    1                ; offset: $0 (0)        ;  unique value for SCSI block 0 
  61. sbBlkSize                 ds.w    1                ; offset: $2 (2)        ;  block size of device 
  62. sbBlkCount                 ds.l    1                ; offset: $4 (4)        ;  number of blocks on device 
  63. sbDevType                 ds.w    1                ; offset: $8 (8)        ;  device type 
  64. sbDevId                     ds.w    1                ; offset: $A (10)        ;  device id 
  65. sbData                     ds.l    1                ; offset: $C (12)        ;  not used 
  66. sbDrvrCount                 ds.w    1                ; offset: $10 (16)        ;  driver descriptor count 
  67. ddBlock                     ds.l    1                ; offset: $12 (18)        ;  1st driver's starting block 
  68. ddSize                     ds.w    1                ; offset: $16 (22)        ;  size of 1st driver (512-byte blks) 
  69. ddType                     ds.w    1                ; offset: $18 (24)        ;  system type (1 for Mac+) 
  70. ddPad                     ds.w    243                ; offset: $1A (26)        ;  ARRAY[0..242] OF INTEGER; not used 
  71. sizeof                     EQU *                    ; size:   $200 (512)
  72.                         ENDR
  73. ;  Driver descriptor 
  74. DDMap                    RECORD 0
  75. ddBlock                     ds.l    1                ; offset: $0 (0)        ;  1st driver's starting block 
  76. ddSize                     ds.w    1                ; offset: $4 (4)        ;  size of 1st driver (512-byte blks) 
  77. ddType                     ds.w    1                ; offset: $6 (6)        ;  system type (1 for Mac+) 
  78. sizeof                     EQU *                    ; size:   $8 (8)
  79.                         ENDR
  80. ;  Partition Map Entry 
  81. Partition                RECORD 0
  82. pmSig                     ds.w    1                ; offset: $0 (0)        ;  unique value for map entry blk 
  83. pmSigPad                 ds.w    1                ; offset: $2 (2)        ;  currently unused 
  84. pmMapBlkCnt                 ds.l    1                ; offset: $4 (4)        ;  # of blks in partition map 
  85. pmPyPartStart             ds.l    1                ; offset: $8 (8)        ;  physical start blk of partition 
  86. pmPartBlkCnt             ds.l    1                ; offset: $C (12)        ;  # of blks in this partition 
  87. pmPartName                 ds.b    32                ; offset: $10 (16)        ;  ASCII partition name 
  88. pmParType                 ds.b    32                ; offset: $30 (48)        ;  ASCII partition type 
  89. pmLgDataStart             ds.l    1                ; offset: $50 (80)        ;  log. # of partition's 1st data blk 
  90. pmDataCnt                 ds.l    1                ; offset: $54 (84)        ;  # of blks in partition's data area 
  91. pmPartStatus             ds.l    1                ; offset: $58 (88)        ;  bit field for partition status 
  92. pmLgBootStart             ds.l    1                ; offset: $5C (92)        ;  log. blk of partition's boot code 
  93. pmBootSize                 ds.l    1                ; offset: $60 (96)        ;  number of bytes in boot code 
  94. pmBootAddr                 ds.l    1                ; offset: $64 (100)        ;  memory load address of boot code 
  95. pmBootAddr2                 ds.l    1                ; offset: $68 (104)        ;  currently unused 
  96. pmBootEntry                 ds.l    1                ; offset: $6C (108)        ;  entry point of boot code 
  97. pmBootEntry2             ds.l    1                ; offset: $70 (112)        ;  currently unused 
  98. pmBootCksum                 ds.l    1                ; offset: $74 (116)        ;  checksum of boot code 
  99. pmProcessor                 ds.b    16                ; offset: $78 (120)        ;  ASCII for the processor type 
  100. pmPad                     ds.w    188                ; offset: $88 (136)        ;  ARRAY[0..187] OF INTEGER; not used 
  101. sizeof                     EQU *                    ; size:   $200 (512)
  102.                         ENDR
  103. ;  TIB instruction 
  104. SCSIInstr                RECORD 0
  105. scOpcode                 ds.w    1                ; offset: $0 (0)
  106. scParam1                 ds.l    1                ; offset: $2 (2)
  107. scParam2                 ds.l    1                ; offset: $6 (6)
  108. sizeof                     EQU *                    ; size:   $A (10)
  109.                         ENDR
  110. ;  SCSI Phases (used by SIMs to support the Original SCSI Manager 
  111.  
  112. kDataOutPhase                    EQU        0                    ; Encoded MSG, C/D, I/O bits 
  113. kDataInPhase                    EQU        1
  114. kCommandPhase                    EQU        2
  115. kStatusPhase                    EQU        3
  116. kPhaseIllegal0                    EQU        4
  117. kPhaseIllegal1                    EQU        5
  118. kMessageOutPhase                EQU        6
  119. kMessageInPhase                    EQU        7
  120. kBusFreePhase                    EQU        8                    ; Additional Phases 
  121. kArbitratePhase                    EQU        9
  122. kSelectPhase                    EQU        10
  123. kMessageInPhaseNACK                EQU        11                    ; Message In Phase with ACK hanging on the bus 
  124.  
  125. ;
  126. ; pascal OSErr SCSIReset(void )
  127. ;
  128.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  129.         Macro
  130.         _SCSIReset
  131.             clr.w               -(sp)
  132.             dc.w                $A815
  133.         EndM
  134.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  135.         IMPORT_CFM_FUNCTION SCSIReset
  136.     ENDIF
  137.  
  138. ;
  139. ; pascal OSErr SCSIGet(void )
  140. ;
  141.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  142.         Macro
  143.         _SCSIGet
  144.             move.w              #$0001,-(sp)
  145.             dc.w                $A815
  146.         EndM
  147.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  148.         IMPORT_CFM_FUNCTION SCSIGet
  149.     ENDIF
  150.  
  151. ;
  152. ; pascal OSErr SCSISelect(short targetID)
  153. ;
  154.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  155.         Macro
  156.         _SCSISelect
  157.             move.w              #$0002,-(sp)
  158.             dc.w                $A815
  159.         EndM
  160.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  161.         IMPORT_CFM_FUNCTION SCSISelect
  162.     ENDIF
  163.  
  164. ;
  165. ; pascal OSErr SCSICmd(Ptr buffer, short count)
  166. ;
  167.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  168.         Macro
  169.         _SCSICmd
  170.             move.w              #$0003,-(sp)
  171.             dc.w                $A815
  172.         EndM
  173.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  174.         IMPORT_CFM_FUNCTION SCSICmd
  175.     ENDIF
  176.  
  177. ;
  178. ; pascal OSErr SCSIRead(Ptr tibPtr)
  179. ;
  180.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  181.         Macro
  182.         _SCSIRead
  183.             move.w              #$0005,-(sp)
  184.             dc.w                $A815
  185.         EndM
  186.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  187.         IMPORT_CFM_FUNCTION SCSIRead
  188.     ENDIF
  189.  
  190. ;
  191. ; pascal OSErr SCSIRBlind(Ptr tibPtr)
  192. ;
  193.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  194.         Macro
  195.         _SCSIRBlind
  196.             move.w              #$0008,-(sp)
  197.             dc.w                $A815
  198.         EndM
  199.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  200.         IMPORT_CFM_FUNCTION SCSIRBlind
  201.     ENDIF
  202.  
  203. ;
  204. ; pascal OSErr SCSIWrite(Ptr tibPtr)
  205. ;
  206.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  207.         Macro
  208.         _SCSIWrite
  209.             move.w              #$0006,-(sp)
  210.             dc.w                $A815
  211.         EndM
  212.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  213.         IMPORT_CFM_FUNCTION SCSIWrite
  214.     ENDIF
  215.  
  216. ;
  217. ; pascal OSErr SCSIWBlind(Ptr tibPtr)
  218. ;
  219.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  220.         Macro
  221.         _SCSIWBlind
  222.             move.w              #$0009,-(sp)
  223.             dc.w                $A815
  224.         EndM
  225.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  226.         IMPORT_CFM_FUNCTION SCSIWBlind
  227.     ENDIF
  228.  
  229. ;
  230. ; pascal OSErr SCSIComplete(short *stat, short *message, unsigned long wait)
  231. ;
  232.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  233.         Macro
  234.         _SCSIComplete
  235.             move.w              #$0004,-(sp)
  236.             dc.w                $A815
  237.         EndM
  238.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  239.         IMPORT_CFM_FUNCTION SCSIComplete
  240.     ENDIF
  241.  
  242. ;
  243. ; pascal short SCSIStat(void )
  244. ;
  245.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  246.         Macro
  247.         _SCSIStat
  248.             move.w              #$000A,-(sp)
  249.             dc.w                $A815
  250.         EndM
  251.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  252.         IMPORT_CFM_FUNCTION SCSIStat
  253.     ENDIF
  254.  
  255. ;
  256. ; pascal OSErr SCSISelAtn(short targetID)
  257. ;
  258.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  259.         Macro
  260.         _SCSISelAtn
  261.             move.w              #$000B,-(sp)
  262.             dc.w                $A815
  263.         EndM
  264.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  265.         IMPORT_CFM_FUNCTION SCSISelAtn
  266.     ENDIF
  267.  
  268. ;
  269. ; pascal OSErr SCSIMsgIn(short *message)
  270. ;
  271.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  272.         Macro
  273.         _SCSIMsgIn
  274.             move.w              #$000C,-(sp)
  275.             dc.w                $A815
  276.         EndM
  277.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  278.         IMPORT_CFM_FUNCTION SCSIMsgIn
  279.     ENDIF
  280.  
  281. ;
  282. ; pascal OSErr SCSIMsgOut(short message)
  283. ;
  284.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  285.         Macro
  286.         _SCSIMsgOut
  287.             move.w              #$000D,-(sp)
  288.             dc.w                $A815
  289.         EndM
  290.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  291.         IMPORT_CFM_FUNCTION SCSIMsgOut
  292.     ENDIF
  293.  
  294.  
  295.  
  296. scsiVERSION                        EQU        43
  297.  
  298. ; * SCSI Callback Procedure Prototypes. Several of these are only callable
  299. ; * from SCSI Manager 4.3 SIM and XPT contexts. 
  300.  
  301. ;  SCSIInterruptPollProcPtr is obsolete (use SCSIInterruptProcPtr) but still here for compatibility 
  302. ;  SCSI Manager 4.3 function codes 
  303.  
  304. SCSINop                            EQU        $00                    ; Execute nothing                                         
  305. SCSIExecIO                        EQU        $01                    ; Execute the specified IO                             
  306. SCSIBusInquiry                    EQU        $03                    ; Get parameters for entire path of HBAs                 
  307. SCSIReleaseQ                    EQU        $04                    ; Release the frozen SIM queue for particular LUN         
  308. SCSIAbortCommand                EQU        $10                    ; Abort the selected Control Block                      
  309. SCSIResetBus                    EQU        $11                    ; Reset the SCSI bus                                      
  310. SCSIResetDevice                    EQU        $12                    ; Reset the SCSI device                                  
  311. SCSITerminateIO                    EQU        $13                    ; Terminate any pending IO                              
  312. SCSIGetVirtualIDInfo            EQU        $80                    ; Find out which bus old ID is on                         
  313. SCSILoadDriver                    EQU        $82                    ; Load a driver for a device ident                     
  314. SCSIOldCall                        EQU        $84                    ; XPT->SIM private call for old-API                     
  315. SCSICreateRefNumXref            EQU        $85                    ; Register a DeviceIdent to drvr RefNum xref             
  316. SCSILookupRefNumXref            EQU        $86                    ; Get DeviceIdent to drvr RefNum xref                     
  317. SCSIRemoveRefNumXref            EQU        $87                    ; Remove a DeviceIdent to drvr RefNum xref             
  318. SCSIRegisterWithNewXPT            EQU        $88                    ; XPT has changed - SIM needs to re-register itself     
  319. vendorUnique                    EQU        $C0                    ; 0xC0 thru 0xFF 
  320.  
  321. ;  Allocation length defines for some of the fields 
  322.  
  323. handshakeDataLength                EQU        8                    ; Handshake data length 
  324. maxCDBLength                    EQU        16                    ; Space for the CDB bytes/pointer 
  325. vendorIDLength                    EQU        16                    ; ASCII string len for Vendor ID  
  326. ;  Define DeviceIdent structure 
  327. DeviceIdent                RECORD 0
  328. diReserved                 ds.b    1                ; offset: $0 (0)        ;  reserved                 
  329. bus                         ds.b    1                ; offset: $1 (1)        ;  SCSI - Bus Number        
  330. targetID                 ds.b    1                ; offset: $2 (2)        ;  SCSI - Target SCSI ID    
  331. LUN                         ds.b    1                ; offset: $3 (3)        ;  SCSI - LUN                  
  332. sizeof                     EQU *                    ; size:   $4 (4)
  333.                         ENDR
  334. ;  Command Descriptor Block structure 
  335. CDB                        RECORD 0
  336. cdbPtr                     ds.l    1                ; offset: $0 (0)        ;  pointer to the CDB, or 
  337.                          ORG 0
  338. cdbBytes                 ds.b    16                ; offset: $0 (0)        ;  the actual CDB to send 
  339. sizeof                     EQU *                    ; size:   $10 (16)
  340.                         ENDR
  341. ; typedef union CDB *                    CDBPtr
  342.  
  343. ;  Scatter/gather list element (Deprecated for MacOS8) 
  344. SGRecord                RECORD 0
  345. SGAddr                     ds.l    1                ; offset: $0 (0)
  346. SGCount                     ds.l    1                ; offset: $4 (4)
  347. sizeof                     EQU *                    ; size:   $8 (8)
  348.                         ENDR
  349. SCSIHdr                    RECORD 0
  350. qLink                     ds.l    1                ; offset: $0 (0)        ;  (internal use, must be nil on entry)    
  351. scsiReserved1             ds.w    1                ; offset: $4 (4)        ;  ->     reserved for input                
  352. scsiPBLength             ds.w    1                ; offset: $6 (6)        ;  -> Length of the entire PB            
  353. scsiFunctionCode         ds.b    1                ; offset: $8 (8)        ;  -> function selector                 
  354. scsiReserved2             ds.b    1                ; offset: $9 (9)        ;  <-     reserved for output                
  355. scsiResult                 ds.w    1                ; offset: $A (10)        ;  <- Returned result                     
  356. scsiDevice                 ds        DeviceIdent        ; offset: $C (12)        ;  -> Device Identifier (bus+target+lun)
  357. scsiCompletion             ds.l    1                ; offset: $10 (16)        ;  -> Callback on completion function      
  358. scsiFlags                 ds.l    1                ; offset: $14 (20)        ;  -> assorted flags                    
  359. scsiDriverStorage         ds.l    1                ; offset: $18 (24)        ;  <> Ptr for driver private use        
  360. scsiXPTprivate             ds.l    1                ; offset: $1C (28)        ;  private field for use in XPT            
  361. scsiReserved3             ds.l    1                ; offset: $20 (32)        ;  reserved                                
  362. sizeof                     EQU *                    ; size:   $24 (36)
  363.                         ENDR
  364. SCSI_PB                    RECORD 0
  365. qLink                     ds.l    1                ; offset: $0 (0)        ;  (internal use, must be nil on entry)    
  366. scsiReserved1             ds.w    1                ; offset: $4 (4)        ;  ->     reserved for input                
  367. scsiPBLength             ds.w    1                ; offset: $6 (6)        ;  -> Length of the entire PB            
  368. scsiFunctionCode         ds.b    1                ; offset: $8 (8)        ;  -> function selector                 
  369. scsiReserved2             ds.b    1                ; offset: $9 (9)        ;  <-     reserved for output                
  370. scsiResult                 ds.w    1                ; offset: $A (10)        ;  <- Returned result                     
  371. scsiDevice                 ds        DeviceIdent        ; offset: $C (12)        ;  -> Device Identifier (bus+target+lun)
  372. scsiCompletion             ds.l    1                ; offset: $10 (16)        ;  -> Callback on completion function      
  373. scsiFlags                 ds.l    1                ; offset: $14 (20)        ;  -> assorted flags                    
  374. scsiDriverStorage         ds.l    1                ; offset: $18 (24)        ;  <> Ptr for driver private use        
  375. scsiXPTprivate             ds.l    1                ; offset: $1C (28)        ;  private field for use in XPT            
  376. scsiReserved3             ds.l    1                ; offset: $20 (32)        ;  reserved                                
  377. sizeof                     EQU *                    ; size:   $24 (36)
  378.                         ENDR
  379. SCSI_IO                    RECORD 0
  380. qLink                     ds.l    1                ; offset: $0 (0)        ;  (internal use, must be nil on entry)    
  381. scsiReserved1             ds.w    1                ; offset: $4 (4)        ;  ->     reserved for input                
  382. scsiPBLength             ds.w    1                ; offset: $6 (6)        ;  -> Length of the entire PB            
  383. scsiFunctionCode         ds.b    1                ; offset: $8 (8)        ;  -> function selector                 
  384. scsiReserved2             ds.b    1                ; offset: $9 (9)        ;  <-     reserved for output                
  385. scsiResult                 ds.w    1                ; offset: $A (10)        ;  <- Returned result                     
  386. scsiDevice                 ds        DeviceIdent        ; offset: $C (12)        ;  -> Device Identifier (bus+target+lun)
  387. scsiCompletion             ds.l    1                ; offset: $10 (16)        ;  -> Callback on completion function      
  388. scsiFlags                 ds.l    1                ; offset: $14 (20)        ;  -> assorted flags                    
  389. scsiDriverStorage         ds.l    1                ; offset: $18 (24)        ;  <> Ptr for driver private use        
  390. scsiXPTprivate             ds.l    1                ; offset: $1C (28)        ;  private field for use in XPT            
  391. scsiReserved3             ds.l    1                ; offset: $20 (32)        ;  reserved                                
  392. scsiResultFlags             ds.w    1                ; offset: $24 (36)        ;  <- Flags which modify the scsiResult field        
  393. scsiReserved3pt5         ds.w    1                ; offset: $26 (38)        ;  -> Reserved                                        
  394. scsiDataPtr                 ds.l    1                ; offset: $28 (40)        ;  -> Pointer to the data buffer or the S/G list      
  395. scsiDataLength             ds.l    1                ; offset: $2C (44)        ;  -> Data transfer length                            
  396. scsiSensePtr             ds.l    1                ; offset: $30 (48)        ;  -> Ptr to autosense data buffer                  
  397. scsiSenseLength             ds.b    1                ; offset: $34 (52)        ;  -> size of the autosense buffer                     
  398. scsiCDBLength             ds.b    1                ; offset: $35 (53)        ;  -> Number of bytes for the CDB                      
  399. scsiSGListCount             ds.w    1                ; offset: $36 (54)        ;  -> num of scatter gather list entries              
  400. scsiReserved4             ds.l    1                ; offset: $38 (56)        ;  <-     reserved for output                            
  401. scsiSCSIstatus             ds.b    1                ; offset: $3C (60)        ;  <- Returned scsi device status                      
  402. scsiSenseResidual         ds.b    1                ; offset: $3D (61)        ;  <- Autosense residual length                      
  403. scsiReserved5             ds.w    1                ; offset: $3E (62)        ;  <-     reserved for output                             
  404. scsiDataResidual         ds.l    1                ; offset: $40 (64)        ;  <- Returned Transfer residual length              
  405. scsiCDB                     ds        CDB                ; offset: $44 (68)        ;  -> Actual CDB or pointer to CDB                  
  406. scsiTimeout                 ds.l    1                ; offset: $54 (84)        ;  -> Timeout value (Time Mgr format) (CAM timeout) 
  407. scsiReserved5pt5         ds.l    1                ; offset: $58 (88)        ;  -> Reserved                                        
  408. scsiReserved5pt6         ds.w    1                ; offset: $5C (92)        ;  -> Reserved                                        
  409. scsiIOFlags                 ds.w    1                ; offset: $5E (94)        ;  -> additional I/O flags                               
  410. scsiTagAction             ds.b    1                ; offset: $60 (96)        ;  -> What to do for tag queuing                       
  411. scsiReserved6             ds.b    1                ; offset: $61 (97)        ;  ->     reserved for input                             
  412. scsiReserved7             ds.w    1                ; offset: $62 (98)        ;  ->     reserved for input                             
  413. scsiSelectTimeout         ds.w    1                ; offset: $64 (100)        ;  -> Select timeout value                             
  414. scsiDataType             ds.b    1                ; offset: $66 (102)        ;  -> Data description type (i.e. buffer, TIB, S/G)    
  415. scsiTransferType         ds.b    1                ; offset: $67 (103)        ;  -> Transfer type (i.e. Blind vs Polled)             
  416. scsiReserved8             ds.l    1                ; offset: $68 (104)        ;  ->     reserved for input                             
  417. scsiReserved9             ds.l    1                ; offset: $6C (108)        ;  ->     reserved for input                             
  418. scsiHandshake             ds.w    8                ; offset: $70 (112)        ;  -> handshaking points (null term'd)    
  419. scsiReserved10             ds.l    1                ; offset: $80 (128)        ;  ->     reserved for input                             
  420. scsiReserved11             ds.l    1                ; offset: $84 (132)        ;  ->   reserved for input                            
  421. scsiCommandLink             ds.l    1                ; offset: $88 (136)        ;  -> Ptr to the next PB in linked cmd chain         
  422. scsiSIMpublics             ds.b    8                ; offset: $8C (140)        ;  ->     reserved for input to 3rd-party SIMs        
  423. scsiAppleReserved6         ds.b    8                ; offset: $94 (148)        ;  ->    reserved for input                              
  424. ;  XPT layer privates (for old-API emulation) 
  425. scsiCurrentPhase         ds.w    1                ; offset: $9C (156)        ;  <- phase upon completing old call                  
  426. scsiSelector             ds.w    1                ; offset: $9E (158)        ;  -> selector specified in old calls                  
  427. scsiOldCallResult         ds.w    1                ; offset: $A0 (160)        ;  <- result of old call                              
  428. scsiSCSImessage             ds.b    1                ; offset: $A2 (162)        ;  <- Returned scsi device message (for SCSIComplete)
  429. XPTprivateFlags             ds.b    1                ; offset: $A3 (163)        ;  <> various flags                                   
  430. XPTextras                 ds.b    12                ; offset: $A4 (164)        ;                                                     
  431. sizeof                     EQU *                    ; size:   $B0 (176)
  432.                         ENDR
  433. SCSIExecIOPB            RECORD 0
  434. f                         ds        SCSI_IO
  435. sizeof                     EQU *                    ; size:   $B0 (176)
  436.                         ENDR
  437.  
  438.  
  439. ;  Bus inquiry PB 
  440. SCSIBusInquiryPB        RECORD 0
  441. qLink                     ds.l    1                ; offset: $0 (0)        ;  (internal use, must be nil on entry)    
  442. scsiReserved1             ds.w    1                ; offset: $4 (4)        ;  ->     reserved for input                
  443. scsiPBLength             ds.w    1                ; offset: $6 (6)        ;  -> Length of the entire PB            
  444. scsiFunctionCode         ds.b    1                ; offset: $8 (8)        ;  -> function selector                 
  445. scsiReserved2             ds.b    1                ; offset: $9 (9)        ;  <-     reserved for output                
  446. scsiResult                 ds.w    1                ; offset: $A (10)        ;  <- Returned result                     
  447. scsiDevice                 ds        DeviceIdent        ; offset: $C (12)        ;  -> Device Identifier (bus+target+lun)
  448. scsiCompletion             ds.l    1                ; offset: $10 (16)        ;  -> Callback on completion function      
  449. scsiFlags                 ds.l    1                ; offset: $14 (20)        ;  -> assorted flags                    
  450. scsiDriverStorage         ds.l    1                ; offset: $18 (24)        ;  <> Ptr for driver private use        
  451. scsiXPTprivate             ds.l    1                ; offset: $1C (28)        ;  private field for use in XPT            
  452. scsiReserved3             ds.l    1                ; offset: $20 (32)        ;  reserved                                
  453. scsiEngineCount             ds.w    1                ; offset: $24 (36)        ;  <- Number of engines on HBA                         
  454. scsiMaxTransferType         ds.w    1                ; offset: $26 (38)        ;  <- Number of transfer types for this HBA            
  455. scsiDataTypes             ds.l    1                ; offset: $28 (40)        ;  <- which data types are supported by this SIM     
  456. scsiIOpbSize             ds.w    1                ; offset: $2C (44)        ;  <- Size of SCSI_IO PB for this SIM/HBA             
  457. scsiMaxIOpbSize             ds.w    1                ; offset: $2E (46)        ;  <- Size of max SCSI_IO PB for all SIM/HBAs         
  458. scsiFeatureFlags         ds.l    1                ; offset: $30 (48)        ;  <- Supported features flags field                 
  459. scsiVersionNumber         ds.b    1                ; offset: $34 (52)        ;  <- Version number for the SIM/HBA                 
  460. scsiHBAInquiry             ds.b    1                ; offset: $35 (53)        ;  <- Mimic of INQ byte 7 for the HBA                 
  461. scsiTargetModeFlags         ds.b    1                ; offset: $36 (54)        ;  <- Flags for target mode support                 
  462. scsiScanFlags             ds.b    1                ; offset: $37 (55)        ;  <- Scan related feature flags                     
  463. scsiSIMPrivatesPtr         ds.l    1                ; offset: $38 (56)        ;  <- Ptr to SIM private data area                     
  464. scsiSIMPrivatesSize         ds.l    1                ; offset: $3C (60)        ;  <- Size of SIM private data area                 
  465. scsiAsyncFlags             ds.l    1                ; offset: $40 (64)        ;  <- Event cap. for Async Callback                 
  466. scsiHiBusID                 ds.b    1                ; offset: $44 (68)        ;  <- Highest path ID in the subsystem              
  467. scsiInitiatorID             ds.b    1                ; offset: $45 (69)        ;  <- ID of the HBA on the SCSI bus                 
  468. scsiBIReserved0             ds.w    1                ; offset: $46 (70)        ;                                                     
  469. scsiBIReserved1             ds.l    1                ; offset: $48 (72)        ;  <-                                                  
  470. scsiFlagsSupported         ds.l    1                ; offset: $4C (76)        ;  <- which scsiFlags are supported                 
  471. scsiIOFlagsSupported     ds.w    1                ; offset: $50 (80)        ;  <- which scsiIOFlags are supported                 
  472. scsiWeirdStuff             ds.w    1                ; offset: $52 (82)        ;  <-                                                 
  473. scsiMaxTarget             ds.w    1                ; offset: $54 (84)        ;  <- maximum Target number supported                 
  474. scsiMaxLUN                 ds.w    1                ; offset: $56 (86)        ;  <- maximum Logical Unit number supported         
  475. scsiSIMVendor             ds.b    16                ; offset: $58 (88)        ;  <- Vendor ID of SIM (or XPT if bus<FF)         
  476. scsiHBAVendor             ds.b    16                ; offset: $68 (104)        ;  <- Vendor ID of the HBA                         
  477. scsiControllerFamily     ds.b    16                ; offset: $78 (120)        ;  <- Family of SCSI Controller                 
  478. scsiControllerType         ds.b    16                ; offset: $88 (136)        ;  <- Specific Model of SCSI Controller used     
  479. scsiXPTversion             ds.b    4                ; offset: $98 (152)        ;  <- version number of XPT                         
  480. scsiSIMversion             ds.b    4                ; offset: $9C (156)        ;  <- version number of SIM                         
  481. scsiHBAversion             ds.b    4                ; offset: $A0 (160)        ;  <- version number of HBA                         
  482. scsiHBAslotType             ds.b    1                ; offset: $A4 (164)        ;  <- type of "slot" that this HBA is in            
  483. scsiHBAslotNumber         ds.b    1                ; offset: $A5 (165)        ;  <- slot number of this HBA                         
  484. scsiSIMsRsrcID             ds.w    1                ; offset: $A6 (166)        ;  <- resource ID of this SIM                         
  485. scsiBIReserved3             ds.w    1                ; offset: $A8 (168)        ;  <-                                                 
  486. scsiAdditionalLength     ds.w    1                ; offset: $AA (170)        ;  <- additional BusInquiry PB len                    
  487. sizeof                     EQU *                    ; size:   $AC (172)
  488.                         ENDR
  489. ;  Abort SIM Request PB 
  490. SCSIAbortCommandPB        RECORD 0
  491. qLink                     ds.l    1                ; offset: $0 (0)        ;  (internal use, must be nil on entry)    
  492. scsiReserved1             ds.w    1                ; offset: $4 (4)        ;  ->     reserved for input                
  493. scsiPBLength             ds.w    1                ; offset: $6 (6)        ;  -> Length of the entire PB            
  494. scsiFunctionCode         ds.b    1                ; offset: $8 (8)        ;  -> function selector                 
  495. scsiReserved2             ds.b    1                ; offset: $9 (9)        ;  <-     reserved for output                
  496. scsiResult                 ds.w    1                ; offset: $A (10)        ;  <- Returned result                     
  497. scsiDevice                 ds        DeviceIdent        ; offset: $C (12)        ;  -> Device Identifier (bus+target+lun)
  498. scsiCompletion             ds.l    1                ; offset: $10 (16)        ;  -> Callback on completion function      
  499. scsiFlags                 ds.l    1                ; offset: $14 (20)        ;  -> assorted flags                    
  500. scsiDriverStorage         ds.l    1                ; offset: $18 (24)        ;  <> Ptr for driver private use        
  501. scsiXPTprivate             ds.l    1                ; offset: $1C (28)        ;  private field for use in XPT            
  502. scsiReserved3             ds.l    1                ; offset: $20 (32)        ;  reserved                                
  503. scsiIOptr                 ds.l    1                ; offset: $24 (36)        ;  Pointer to the PB to abort            
  504. sizeof                     EQU *                    ; size:   $28 (40)
  505.                         ENDR
  506. ;  Terminate I/O Process Request PB 
  507. SCSITerminateIOPB        RECORD 0
  508. qLink                     ds.l    1                ; offset: $0 (0)        ;  (internal use, must be nil on entry)    
  509. scsiReserved1             ds.w    1                ; offset: $4 (4)        ;  ->     reserved for input                
  510. scsiPBLength             ds.w    1                ; offset: $6 (6)        ;  -> Length of the entire PB            
  511. scsiFunctionCode         ds.b    1                ; offset: $8 (8)        ;  -> function selector                 
  512. scsiReserved2             ds.b    1                ; offset: $9 (9)        ;  <-     reserved for output                
  513. scsiResult                 ds.w    1                ; offset: $A (10)        ;  <- Returned result                     
  514. scsiDevice                 ds        DeviceIdent        ; offset: $C (12)        ;  -> Device Identifier (bus+target+lun)
  515. scsiCompletion             ds.l    1                ; offset: $10 (16)        ;  -> Callback on completion function      
  516. scsiFlags                 ds.l    1                ; offset: $14 (20)        ;  -> assorted flags                    
  517. scsiDriverStorage         ds.l    1                ; offset: $18 (24)        ;  <> Ptr for driver private use        
  518. scsiXPTprivate             ds.l    1                ; offset: $1C (28)        ;  private field for use in XPT            
  519. scsiReserved3             ds.l    1                ; offset: $20 (32)        ;  reserved                                
  520. scsiIOptr                 ds.l    1                ; offset: $24 (36)        ;  Pointer to the PB to terminate         
  521. sizeof                     EQU *                    ; size:   $28 (40)
  522.                         ENDR
  523. ;  Reset SCSI Bus PB 
  524. SCSIResetBusPB            RECORD 0
  525. qLink                     ds.l    1                ; offset: $0 (0)        ;  (internal use, must be nil on entry)    
  526. scsiReserved1             ds.w    1                ; offset: $4 (4)        ;  ->     reserved for input                
  527. scsiPBLength             ds.w    1                ; offset: $6 (6)        ;  -> Length of the entire PB            
  528. scsiFunctionCode         ds.b    1                ; offset: $8 (8)        ;  -> function selector                 
  529. scsiReserved2             ds.b    1                ; offset: $9 (9)        ;  <-     reserved for output                
  530. scsiResult                 ds.w    1                ; offset: $A (10)        ;  <- Returned result                     
  531. scsiDevice                 ds        DeviceIdent        ; offset: $C (12)        ;  -> Device Identifier (bus+target+lun)
  532. scsiCompletion             ds.l    1                ; offset: $10 (16)        ;  -> Callback on completion function      
  533. scsiFlags                 ds.l    1                ; offset: $14 (20)        ;  -> assorted flags                    
  534. scsiDriverStorage         ds.l    1                ; offset: $18 (24)        ;  <> Ptr for driver private use        
  535. scsiXPTprivate             ds.l    1                ; offset: $1C (28)        ;  private field for use in XPT            
  536. scsiReserved3             ds.l    1                ; offset: $20 (32)        ;  reserved                                
  537. sizeof                     EQU *                    ; size:   $24 (36)
  538.                         ENDR
  539. ;  Reset SCSI Device PB 
  540. SCSIResetDevicePB        RECORD 0
  541. qLink                     ds.l    1                ; offset: $0 (0)        ;  (internal use, must be nil on entry)    
  542. scsiReserved1             ds.w    1                ; offset: $4 (4)        ;  ->     reserved for input                
  543. scsiPBLength             ds.w    1                ; offset: $6 (6)        ;  -> Length of the entire PB            
  544. scsiFunctionCode         ds.b    1                ; offset: $8 (8)        ;  -> function selector                 
  545. scsiReserved2             ds.b    1                ; offset: $9 (9)        ;  <-     reserved for output                
  546. scsiResult                 ds.w    1                ; offset: $A (10)        ;  <- Returned result                     
  547. scsiDevice                 ds        DeviceIdent        ; offset: $C (12)        ;  -> Device Identifier (bus+target+lun)
  548. scsiCompletion             ds.l    1                ; offset: $10 (16)        ;  -> Callback on completion function      
  549. scsiFlags                 ds.l    1                ; offset: $14 (20)        ;  -> assorted flags                    
  550. scsiDriverStorage         ds.l    1                ; offset: $18 (24)        ;  <> Ptr for driver private use        
  551. scsiXPTprivate             ds.l    1                ; offset: $1C (28)        ;  private field for use in XPT            
  552. scsiReserved3             ds.l    1                ; offset: $20 (32)        ;  reserved                                
  553. sizeof                     EQU *                    ; size:   $24 (36)
  554.                         ENDR
  555. ;  Release SIM Queue PB 
  556. SCSIReleaseQPB            RECORD 0
  557. qLink                     ds.l    1                ; offset: $0 (0)        ;  (internal use, must be nil on entry)    
  558. scsiReserved1             ds.w    1                ; offset: $4 (4)        ;  ->     reserved for input                
  559. scsiPBLength             ds.w    1                ; offset: $6 (6)        ;  -> Length of the entire PB            
  560. scsiFunctionCode         ds.b    1                ; offset: $8 (8)        ;  -> function selector                 
  561. scsiReserved2             ds.b    1                ; offset: $9 (9)        ;  <-     reserved for output                
  562. scsiResult                 ds.w    1                ; offset: $A (10)        ;  <- Returned result                     
  563. scsiDevice                 ds        DeviceIdent        ; offset: $C (12)        ;  -> Device Identifier (bus+target+lun)
  564. scsiCompletion             ds.l    1                ; offset: $10 (16)        ;  -> Callback on completion function      
  565. scsiFlags                 ds.l    1                ; offset: $14 (20)        ;  -> assorted flags                    
  566. scsiDriverStorage         ds.l    1                ; offset: $18 (24)        ;  <> Ptr for driver private use        
  567. scsiXPTprivate             ds.l    1                ; offset: $1C (28)        ;  private field for use in XPT            
  568. scsiReserved3             ds.l    1                ; offset: $20 (32)        ;  reserved                                
  569. sizeof                     EQU *                    ; size:   $24 (36)
  570.                         ENDR
  571. ;  SCSI Get Virtual ID Info PB 
  572. SCSIGetVirtualIDInfoPB    RECORD 0
  573. qLink                     ds.l    1                ; offset: $0 (0)        ;  (internal use, must be nil on entry)    
  574. scsiReserved1             ds.w    1                ; offset: $4 (4)        ;  ->     reserved for input                
  575. scsiPBLength             ds.w    1                ; offset: $6 (6)        ;  -> Length of the entire PB            
  576. scsiFunctionCode         ds.b    1                ; offset: $8 (8)        ;  -> function selector                 
  577. scsiReserved2             ds.b    1                ; offset: $9 (9)        ;  <-     reserved for output                
  578. scsiResult                 ds.w    1                ; offset: $A (10)        ;  <- Returned result                     
  579. scsiDevice                 ds        DeviceIdent        ; offset: $C (12)        ;  -> Device Identifier (bus+target+lun)
  580. scsiCompletion             ds.l    1                ; offset: $10 (16)        ;  -> Callback on completion function      
  581. scsiFlags                 ds.l    1                ; offset: $14 (20)        ;  -> assorted flags                    
  582. scsiDriverStorage         ds.l    1                ; offset: $18 (24)        ;  <> Ptr for driver private use        
  583. scsiXPTprivate             ds.l    1                ; offset: $1C (28)        ;  private field for use in XPT            
  584. scsiReserved3             ds.l    1                ; offset: $20 (32)        ;  reserved                                
  585. scsiOldCallID             ds.w    1                ; offset: $24 (36)        ;  -> SCSI ID of device in question     
  586. scsiExists                 ds.b    1                ; offset: $26 (38)        ;  <- true if device exists             
  587. filler                     ds.b    1                ; offset: $27 (39)
  588. sizeof                     EQU *                    ; size:   $28 (40)
  589.                         ENDR
  590. ;  Create/Lookup/Remove RefNum for Device PB 
  591. SCSIDriverPB            RECORD 0
  592. qLink                     ds.l    1                ; offset: $0 (0)        ;  (internal use, must be nil on entry)    
  593. scsiReserved1             ds.w    1                ; offset: $4 (4)        ;  ->     reserved for input                
  594. scsiPBLength             ds.w    1                ; offset: $6 (6)        ;  -> Length of the entire PB            
  595. scsiFunctionCode         ds.b    1                ; offset: $8 (8)        ;  -> function selector                 
  596. scsiReserved2             ds.b    1                ; offset: $9 (9)        ;  <-     reserved for output                
  597. scsiResult                 ds.w    1                ; offset: $A (10)        ;  <- Returned result                     
  598. scsiDevice                 ds        DeviceIdent        ; offset: $C (12)        ;  -> Device Identifier (bus+target+lun)
  599. scsiCompletion             ds.l    1                ; offset: $10 (16)        ;  -> Callback on completion function      
  600. scsiFlags                 ds.l    1                ; offset: $14 (20)        ;  -> assorted flags                    
  601. scsiDriverStorage         ds.l    1                ; offset: $18 (24)        ;  <> Ptr for driver private use        
  602. scsiXPTprivate             ds.l    1                ; offset: $1C (28)        ;  private field for use in XPT            
  603. scsiReserved3             ds.l    1                ; offset: $20 (32)        ;  reserved                                
  604. scsiDriver                 ds.w    1                ; offset: $24 (36)        ;  -> DriverRefNum, For SetDriver, <- For GetNextDriver 
  605. scsiDriverFlags             ds.w    1                ; offset: $26 (38)        ;  <> Details of driver/device             
  606. scsiNextDevice             ds        DeviceIdent        ; offset: $28 (40)        ;  <- DeviceIdent of the NEXT Item in the list  
  607. sizeof                     EQU *                    ; size:   $2C (44)
  608.                         ENDR
  609. ;  Load Driver PB 
  610. SCSILoadDriverPB        RECORD 0
  611. qLink                     ds.l    1                ; offset: $0 (0)        ;  (internal use, must be nil on entry)    
  612. scsiReserved1             ds.w    1                ; offset: $4 (4)        ;  ->     reserved for input                
  613. scsiPBLength             ds.w    1                ; offset: $6 (6)        ;  -> Length of the entire PB            
  614. scsiFunctionCode         ds.b    1                ; offset: $8 (8)        ;  -> function selector                 
  615. scsiReserved2             ds.b    1                ; offset: $9 (9)        ;  <-     reserved for output                
  616. scsiResult                 ds.w    1                ; offset: $A (10)        ;  <- Returned result                     
  617. scsiDevice                 ds        DeviceIdent        ; offset: $C (12)        ;  -> Device Identifier (bus+target+lun)
  618. scsiCompletion             ds.l    1                ; offset: $10 (16)        ;  -> Callback on completion function      
  619. scsiFlags                 ds.l    1                ; offset: $14 (20)        ;  -> assorted flags                    
  620. scsiDriverStorage         ds.l    1                ; offset: $18 (24)        ;  <> Ptr for driver private use        
  621. scsiXPTprivate             ds.l    1                ; offset: $1C (28)        ;  private field for use in XPT            
  622. scsiReserved3             ds.l    1                ; offset: $20 (32)        ;  reserved                                
  623. scsiLoadedRefNum         ds.w    1                ; offset: $24 (36)        ;  <- SIM returns refnum of driver         
  624. scsiDiskLoadFailed         ds.b    1                ; offset: $26 (38)        ;  -> if true, indicates call after failure to load 
  625. filler                     ds.b    1                ; offset: $27 (39)
  626. sizeof                     EQU *                    ; size:   $28 (40)
  627.                         ENDR
  628.  
  629. ;  Defines for the scsiTransferType field 
  630.  
  631. scsiTransferBlind                EQU        0
  632. scsiTransferPolled                EQU        1
  633.  
  634. scsiErrorBase                    EQU        -7936
  635.  
  636. scsiRequestInProgress            EQU        1                    ; 1     = PB request is in progress             
  637.                                                             ; Execution failed  00-2F 
  638. scsiRequestAborted                EQU        -7934                ; -7934 = PB request aborted by the host         
  639. scsiUnableToAbort                EQU        -7933                ; -7933 = Unable to Abort PB request             
  640. scsiNonZeroStatus                EQU        -7932                ; -7932 = PB request completed with an err     
  641. scsiUnused05                    EQU        -7931                ; -7931 =                                      
  642. scsiUnused06                    EQU        -7930                ; -7930 =                                      
  643. scsiUnused07                    EQU        -7929                ; -7929 =                                      
  644. scsiUnused08                    EQU        -7928                ; -7928 =                                      
  645. scsiUnableToTerminate            EQU        -7927                ; -7927 = Unable to Terminate I/O PB req         
  646. scsiSelectTimeout                EQU        -7926                ; -7926 = Target selection timeout             
  647. scsiCommandTimeout                EQU        -7925                ; -7925 = Command timeout                      
  648. scsiIdentifyMessageRejected        EQU        -7924                ; -7924 =                                      
  649. scsiMessageRejectReceived        EQU        -7923                ; -7923 = Message reject received                 
  650. scsiSCSIBusReset                EQU        -7922                ; -7922 = SCSI bus reset sent/received         
  651. scsiParityError                    EQU        -7921                ; -7921 = Uncorrectable parity error occured     
  652. scsiAutosenseFailed                EQU        -7920                ; -7920 = Autosense: Request sense cmd fail     
  653. scsiUnused11                    EQU        -7919                ; -7919 =                                      
  654. scsiDataRunError                EQU        -7918                ; -7918 = Data overrun/underrun error          
  655. scsiUnexpectedBusFree            EQU        -7917                ; -7917 = Unexpected BUS free                     
  656. scsiSequenceFailed                EQU        -7916                ; -7916 = Target bus phase sequence failure     
  657. scsiWrongDirection                EQU        -7915                ; -7915 = Data phase was in wrong direction     
  658. scsiUnused16                    EQU        -7914                ; -7914 =                                      
  659. scsiBDRsent                        EQU        -7913                ; -7913 = A SCSI BDR msg was sent to target     
  660. scsiTerminated                    EQU        -7912                ; -7912 = PB request terminated by the host     
  661. scsiNoNexus                        EQU        -7911                ; -7911 = Nexus is not established             
  662. scsiCDBReceived                    EQU        -7910                ; -7910 = The SCSI CDB has been received         
  663.                                                             ; Couldn't begin execution  30-3F 
  664. scsiTooManyBuses                EQU        -7888                ; -7888 = Register failed because we're full    
  665. scsiBusy                        EQU        -7887                ; -7887 = SCSI subsystem is busy                 
  666. scsiProvideFail                    EQU        -7886                ; -7886 = Unable to provide requ. capability    
  667. scsiDeviceNotThere                EQU        -7885                ; -7885 = SCSI device not installed/there      
  668. scsiNoHBA                        EQU        -7884                ; -7884 = No HBA detected Error                 
  669. scsiDeviceConflict                EQU        -7883                ; -7883 = sorry, max 1 refNum per DeviceIdent     
  670. scsiNoSuchXref                    EQU        -7882                ; -7882 = no such RefNum xref                     
  671. scsiQLinkInvalid                EQU        -7881                ; -7881 = pre-linked PBs not supported            
  672.                                                             ;   (The QLink field was nonzero)                
  673.                                                             ; Parameter errors  40-7F 
  674. scsiPBLengthError                EQU        -7872                ; -7872 = (scsiPBLength is insuf'ct/invalid     
  675. scsiFunctionNotAvailable        EQU        -7871                ; -7871 = The requ. func is not available      
  676. scsiRequestInvalid                EQU        -7870                ; -7870 = PB request is invalid                 
  677. scsiBusInvalid                    EQU        -7869                ; -7869 = Bus ID supplied is invalid              
  678. scsiTIDInvalid                    EQU        -7868                ; -7868 = Target ID supplied is invalid         
  679. scsiLUNInvalid                    EQU        -7867                ; -7867 = LUN supplied is invalid              
  680. scsiIDInvalid                    EQU        -7866                ; -7866 = The initiator ID is invalid          
  681. scsiDataTypeInvalid                EQU        -7865                ; -7865 = scsiDataType requested not supported 
  682. scsiTransferTypeInvalid            EQU        -7864                ; -7864 = scsiTransferType field is too high     
  683. scsiCDBLengthInvalid            EQU        -7863                ; -7863 = scsiCDBLength field is too big         
  684. ;  New errors for SCSI Family         
  685.  
  686. scsiUnused74                    EQU        -7862                ; -7862 =                                          
  687. scsiUnused75                    EQU        -7861                ; -7861 =                                         
  688. scsiBadDataLength                EQU        -7860                ; -7860 = a zero data length in PB             
  689. scsiPartialPrepared                EQU        -7859                ; -7859 = could not do full prepare mem for I/O
  690. scsiInvalidMsgType                EQU        -7858                ; -7858 = Invalid message type (internal)        
  691. scsiUnused79                    EQU        -7857                ; -7857 =                                           
  692. scsiBadConnID                    EQU        -7856                ; -7856 = Bad Connection ID                      
  693. scsiUnused81                    EQU        -7855                ; -7855 =                                         
  694. scsiIOInProgress                EQU        -7854                ; -7854 = Can't close conn, IO in prog            
  695. scsiTargetReserved                EQU        -7853                ; -7853 = Target already reserved                
  696. scsiUnused84                    EQU        -7852                ; -7852 =                                         
  697. scsiUnused85                    EQU        -7851                ; -7851 =                                         
  698. scsiBadConnType                    EQU        -7850                ; -7850 = Bad connection type                    
  699. scsiCannotLoadPlugin            EQU        -7849                ; -7849 = No matching service category            
  700. ;  +++ 
  701. ; * scsiFamilyInternalError and scsiPluginInternalError are intended to handle consistency check failures.
  702. ; * For example, if the family stores a record on a lookaside queue, but does not find that record
  703. ; * it can use this error to report this failure. SCSI Manager 4.3 uses dsIOCoreErr in a few places,
  704. ; * but this is probably not the best error. In general, internal errors should be reported as bugs.
  705. ; *
  706. ; * The following range of errors is provided for third-party (non-Apple) SCSI SIM and device driver vendors.
  707. ; * In general, they would be used for error conditions that are not covered by the standardized errors.
  708. ; * They should not normally be conveyed to normal applications, but might be used for communication between
  709. ; * a plug-in and a vendor-provided device driver (for example, to manage RAID hot-swapping).
  710. ; *
  711. ; * Note: I don't know how many SCSI errors are reserved in the error code architecture. Don't assume that
  712. ; * we'll actually get sixteen, but we should reserve at least one.
  713.  
  714.  
  715. scsiFamilyInternalError            EQU        -7849                ; -7849 = Internal consistency check failed    
  716. scsiPluginInternalError            EQU        -7848                ; -7848 = Internal consistency check failed    
  717. scsiVendorSpecificErrorBase        EQU        -7808                ; ??    = Start of third-party error range        
  718. scsiVendorSpecificErrorCount    EQU        16                    ; Number of third-party errors                    
  719. ;  --- 
  720.  
  721. scsiExecutionErrors                EQU        -7936
  722. scsiNotExecutedErrors            EQU        -7888
  723. scsiParameterErrors                EQU        -7872
  724. ;  Defines for the scsiResultFlags field 
  725.  
  726. scsiSIMQFrozen                    EQU        $0001                ; The SIM queue is frozen w/this err            
  727. scsiAutosenseValid                EQU        $0002                ; Autosense data valid for target              
  728. scsiBusNotFree                    EQU        $0004                ; At time of callback, SCSI bus is not free    
  729. ;  Defines for the bit numbers of the scsiFlags field in the PB header for the SCSIExecIO function 
  730.  
  731. kbSCSIDisableAutosense            EQU        29                    ; Disable auto sense feature                     
  732. kbSCSIFlagReservedA                EQU        28                    ;                                              
  733. kbSCSIFlagReserved0                EQU        27                    ;                                              
  734. kbSCSICDBLinked                    EQU        26                    ; The PB contains a linked CDB                    
  735. kbSCSIQEnable                    EQU        25                    ; Target queue actions are enabled                
  736. kbSCSICDBIsPointer                EQU        24                    ; The CDB field contains a pointer                
  737. kbSCSIFlagReserved1                EQU        23                    ;                                                 
  738. kbSCSIInitiateSyncData            EQU        22                    ; Attempt Sync data xfer and SDTR                
  739. kbSCSIDisableSyncData            EQU        21                    ; Disable sync, go to async                    
  740. kbSCSISIMQHead                    EQU        20                    ; Place PB at the head of SIM Q                
  741. kbSCSISIMQFreeze                EQU        19                    ; Return the SIM Q to frozen state                
  742. kbSCSISIMQNoFreeze                EQU        18                    ; Disallow SIM Q freezing                        
  743. kbSCSIDoDisconnect                EQU        17                    ; Definitely do disconnect                        
  744. kbSCSIDontDisconnect            EQU        16                    ; Definitely don't disconnect                    
  745. kbSCSIDataReadyForDMA            EQU        15                    ; Data buffer(s) are ready for DMA                
  746. kbSCSIFlagReserved3                EQU        14                    ;                                                 
  747. kbSCSIDataPhysical                EQU        13                    ; SG/Buffer data ptrs are physical                
  748. kbSCSISensePhysical                EQU        12                    ; Autosense buffer ptr is physical                
  749. kbSCSIFlagReserved5                EQU        11                    ;                                                 
  750. kbSCSIFlagReserved6                EQU        10                    ;                                                 
  751. kbSCSIFlagReserved7                EQU        9                    ;                                                 
  752. kbSCSIFlagReserved8                EQU        8                    ;                                                 
  753. kbSCSIDataBufferValid            EQU        7                    ; Data buffer valid                            
  754. kbSCSIStatusBufferValid            EQU        6                    ; Status buffer valid                             
  755. kbSCSIMessageBufferValid        EQU        5                    ; Message buffer valid                            
  756. kbSCSIFlagReserved9                EQU        4                    ;                                              
  757. ;  Defines for the bit masks of the scsiFlags field 
  758.  
  759. scsiDirectionMask                EQU        $C0000000            ; Data direction mask                        
  760. scsiDirectionNone                EQU        $C0000000            ; Data direction (11: no data)                
  761. scsiDirectionReserved            EQU        $00000000            ; Data direction (00: reserved)            
  762. scsiDirectionOut                EQU        $80000000            ; Data direction (10: DATA OUT)            
  763. scsiDirectionIn                    EQU        $40000000            ; Data direction (01: DATA IN)                
  764. scsiDisableAutosense            EQU        $20000000            ; Disable auto sense feature                
  765. scsiFlagReservedA                EQU        $10000000            ;                                             
  766. scsiFlagReserved0                EQU        $08000000            ;                                             
  767. scsiCDBLinked                    EQU        $04000000            ; The PB contains a linked CDB                
  768. scsiQEnable                        EQU        $02000000            ; Target queue actions are enabled            
  769. scsiCDBIsPointer                EQU        $01000000            ; The CDB field contains a pointer            
  770. scsiFlagReserved1                EQU        $00800000            ;                                             
  771. scsiInitiateSyncData            EQU        $00400000            ; Attempt Sync data xfer and SDTR            
  772. scsiDisableSyncData                EQU        $00200000            ; Disable sync, go to async                
  773. scsiSIMQHead                    EQU        $00100000            ; Place PB at the head of SIM Q            
  774. scsiSIMQFreeze                    EQU        $00080000            ; Return the SIM Q to frozen state            
  775. scsiSIMQNoFreeze                EQU        $00040000            ; Disallow SIM Q freezing                    
  776. scsiDoDisconnect                EQU        $00020000            ; Definitely do disconnect                    
  777. scsiDontDisconnect                EQU        $00010000            ; Definitely don't disconnect                
  778. scsiDataReadyForDMA                EQU        $00008000            ; Data buffer(s) are ready for DMA            
  779. scsiFlagReserved3                EQU        $00004000            ;  
  780. scsiDataPhysical                EQU        $00002000            ; SG/Buffer data ptrs are physical            
  781. scsiSensePhysical                EQU        $00001000            ; Autosense buffer ptr is physical            
  782. scsiFlagReserved5                EQU        $00000800            ;                                          
  783. scsiFlagReserved6                EQU        $00000400            ;                                             
  784. scsiFlagReserved7                EQU        $00000200            ;                                             
  785. scsiFlagReserved8                EQU        $00000100            ;                                             
  786. ;  bit masks for the scsiIOFlags field in SCSIExecIOPB 
  787.  
  788. scsiNoParityCheck                EQU        $0002                ; disable parity checking                             
  789. scsiDisableSelectWAtn            EQU        $0004                ; disable select w/Atn                              
  790. scsiSavePtrOnDisconnect            EQU        $0008                ; do SaveDataPointer upon Disconnect msg             
  791. scsiNoBucketIn                    EQU        $0010                ; don’t bit bucket in during this I/O                 
  792. scsiNoBucketOut                    EQU        $0020                ; don’t bit bucket out during this I/O             
  793. scsiDisableWide                    EQU        $0040                ; disable wide transfer negotiation                 
  794. scsiInitiateWide                EQU        $0080                ; initiate wide transfer negotiation                 
  795. scsiRenegotiateSense            EQU        $0100                ; renegotiate sync/wide before issuing autosense     
  796. scsiDisableDiscipline            EQU        $0200                ; disable parameter checking on SCSIExecIO calls    
  797. scsiIOFlagReserved0080            EQU        $0080                ;                                                  
  798. scsiIOFlagReserved8000            EQU        $8000                ;                                                     
  799. ;  Defines for the Bus Inquiry PB fields. 
  800. ;  scsiHBAInquiry field bits 
  801.  
  802. scsiBusMDP                        EQU        $80                    ; Supports Modify Data Pointer message                        
  803. scsiBusWide32                    EQU        $40                    ; Supports 32 bit wide SCSI                                
  804. scsiBusWide16                    EQU        $20                    ; Supports 16 bit wide SCSI                                
  805. scsiBusSDTR                        EQU        $10                    ; Supports Sync Data Transfer Req message                    
  806. scsiBusLinkedCDB                EQU        $08                    ; Supports linked CDBs                                        
  807. scsiBusTagQ                        EQU        $02                    ; Supports tag queue message                                
  808. scsiBusSoftReset                EQU        $01                    ; Supports soft reset                                        
  809. ;  Defines for the scsiDataType field 
  810.  
  811. scsiDataBuffer                    EQU        0                    ; single contiguous buffer supplied                  
  812. scsiDataTIB                        EQU        1                    ; TIB supplied (ptr in scsiDataPtr)                 
  813. scsiDataSG                        EQU        2                    ; scatter/gather list supplied                      
  814. scsiDataIOTable                    EQU        3                    ;#(7/11/95) Prepared by Block Storage              
  815. ;  scsiDataTypes field bits  
  816. ;     bits 0->15 Apple-defined, 16->30 3rd-party unique, 31 = reserved 
  817.  
  818. scsiBusDataTIB                    EQU        $02                    ; TIB supplied (ptr in scsiDataPtr)        
  819. scsiBusDataBuffer                EQU        $01                    ; single contiguous buffer supplied         
  820. scsiBusDataSG                    EQU        $04                    ; scatter/gather list supplied             
  821. scsiBusDataIOTable                EQU        $08                    ; (2/6/95) Prepare Memory for IO
  822. scsiBusDataReserved                EQU        $80000000            ;                                           
  823. ;  scsiScanFlags field bits 
  824.  
  825. scsiBusScansDevices                EQU        $80                    ; Bus scans for and maintains device list            
  826. scsiBusScansOnInit                EQU        $40                    ; Bus scans performed at power-up/reboot            
  827. scsiBusLoadsROMDrivers            EQU        $20                    ; may load ROM drivers to support targets             
  828. ;  scsiFeatureFlags field bits 
  829.  
  830. scsiBusInternalExternalMask        EQU        $000000C0            ; bus internal/external mask                    
  831. scsiBusInternalExternalUnknown    EQU        $00000000            ; not known whether bus is inside or outside     
  832. scsiBusInternalExternal            EQU        $000000C0            ; bus goes inside and outside the box             
  833. scsiBusInternal                    EQU        $00000080            ; bus goes inside the box                         
  834. scsiBusExternal                    EQU        $00000040            ; bus goes outside the box                     
  835. scsiBusCacheCoherentDMA            EQU        $00000020            ; DMA is cache coherent                         
  836. scsiBusOldCallCapable            EQU        $00000010            ; SIM is old call capable                         
  837. scsiBusDifferential                EQU        $00000004            ; Single Ended (0) or Differential (1)         
  838. scsiBusFastSCSI                    EQU        $00000002            ; HBA supports fast SCSI                         
  839. scsiBusDMAavailable                EQU        $00000001            ; DMA is available                             
  840. ;  scsiWeirdStuff field bits 
  841.  
  842. scsiOddDisconnectUnsafeRead1    EQU        $0001                ; Disconnects on odd byte boundries are unsafe with DMA and/or blind reads 
  843. scsiOddDisconnectUnsafeWrite1    EQU        $0002                ; Disconnects on odd byte boundries are unsafe with DMA and/or blind writes 
  844. scsiBusErrorsUnsafe                EQU        $0004                ; Non-handshaked delays or disconnects during blind transfers may cause a crash 
  845. scsiRequiresHandshake            EQU        $0008                ; Non-handshaked delays or disconnects during blind transfers may cause data corruption 
  846. scsiTargetDrivenSDTRSafe        EQU        $0010                ; Targets which initiate synchronous negotiations are supported 
  847. scsiOddCountForPhysicalUnsafe    EQU        $0020                ; If using physical addrs all counts must be even, and disconnects must be on even boundries 
  848. scsiAbortCmdFixed                EQU        $0040                ; Set if abort command is fixed to properly make callbacks 
  849. scsiMeshACKTimingFixed            EQU        $0080                ; Set if bug allowing Mesh to release ACK prematurely is fixed 
  850. ;  scsiHBAslotType values 
  851.  
  852. scsiMotherboardBus                EQU        $00                    ; A built in Apple supplied bus                     
  853. scsiNuBus                        EQU        $01                    ; A SIM on a NuBus card                             
  854. scsiPDSBus                        EQU        $03                    ;    "  on a PDS card                                
  855. scsiPCIBus                        EQU        $04                    ;    "  on a PCI bus card                            
  856. scsiPCMCIABus                    EQU        $05                    ;    "  on a PCMCIA card                            
  857. scsiFireWireBridgeBus            EQU        $06                    ;    "  connected through a FireWire bridge        
  858. ;  Defines for the scsiDriverFlags field (in SCSIDriverPB) 
  859.  
  860. scsiDeviceSensitive                EQU        $0001                ; Only driver should access this device                
  861. scsiDeviceNoOldCallAccess        EQU        $0002                ; no old call access to this device                     
  862. ;   SIMInitInfo PB 
  863. ;  directions are for SCSIRegisterBus call ( -> parm, <- result)             
  864. SIMInitInfo                RECORD 0
  865. SIMstaticPtr             ds.l    1                ; offset: $0 (0)        ;  <- alloc. ptr to the SIM's static vars                 
  866. staticSize                 ds.l    1                ; offset: $4 (4)        ;  -> num bytes SIM needs for static vars                 
  867. SIMInit                     ds.l    1                ; offset: $8 (8)        ;  -> pointer to the SIM init routine                     
  868. SIMAction                 ds.l    1                ; offset: $C (12)        ;  -> pointer to the SIM action routine                 
  869. SIM_ISR                     ds.l    1                ; offset: $10 (16)        ;        reserved                                             
  870. SIMInterruptPoll         ds.l    1                ; offset: $14 (20)        ;  -> pointer to the SIM interrupt poll routine            
  871. NewOldCall                 ds.l    1                ; offset: $18 (24)        ;  -> pointer to the SIM NewOldCall routine                
  872. ioPBSize                 ds.w    1                ; offset: $1C (28)        ;  -> size of SCSI_IO_PBs required for this SIM            
  873. oldCallCapable             ds.b    1                ; offset: $1E (30)        ;  -> true if this SIM can handle old-API calls            
  874. simInfoUnused1             ds.b    1                ; offset: $1F (31)        ;        reserved                                            
  875. simInternalUse             ds.l    1                ; offset: $20 (32)        ;  xx not affected or viewed by XPT                        
  876. XPT_ISR                     ds.l    1                ; offset: $24 (36)        ;     reserved                                            
  877. EnteringSIM                 ds.l    1                ; offset: $28 (40)        ;  <- ptr to the EnteringSIM routine                    
  878. ExitingSIM                 ds.l    1                ; offset: $2C (44)        ;  <- ptr to the ExitingSIM routine                        
  879. MakeCallback             ds.l    1                ; offset: $30 (48)        ;  <- the XPT layer’s SCSIMakeCallback routine            
  880. busID                     ds.w    1                ; offset: $34 (52)        ;  <- bus number for the registered bus                    
  881. simSlotNumber             ds.b    1                ; offset: $36 (54)        ;  <- Magic cookie to place in scsiHBASlotNumber (PCI)    
  882. simSRsrcID                 ds.b    1                ; offset: $37 (55)        ;  <- Magic cookie to place in scsiSIMsRsrcID     (PCI)    
  883. simRegEntry                 ds.l    1                ; offset: $38 (56)        ;  -> The SIM's RegEntryIDPtr                     (PCI)    
  884. sizeof                     EQU *                    ; size:   $3C (60)
  885.                         ENDR
  886. ;  Glue between SCSI calls and SCSITrap format 
  887.  
  888. xptSCSIAction                    EQU        $0001
  889. xptSCSIRegisterBus                EQU        $0002
  890. xptSCSIDeregisterBus            EQU        $0003
  891. xptSCSIReregisterBus            EQU        $0004
  892. xptSCSIKillXPT                    EQU        $0005                ; kills Mini-XPT after transition 
  893. xptSCSIInitialize                EQU        $000A                ; Initialize the SCSI manager 
  894. ; * SCSI bus status. These values are returned by the SCSI target in the status phase.
  895. ; * They are not related to Macintosh status values (except that values other than
  896. ; * scsiStatusGood will result in scsiResult set to scsiNonZeroStatus).
  897.  
  898.  
  899. scsiStatGood                    EQU        $00                    ; Good Status
  900. scsiStatCheckCondition            EQU        $02                    ; Check Condition
  901. scsiStatConditionMet            EQU        $04                    ; Condition Met
  902. scsiStatBusy                    EQU        $08                    ; Busy
  903. scsiStatIntermediate            EQU        $10                    ; Intermediate
  904. scsiStatIntermedMet                EQU        $14                    ; Intermediate - Condition Met
  905. scsiStatResvConflict            EQU        $18                    ; Reservation conflict
  906. scsiStatTerminated                EQU        $22                    ; Command terminated
  907. scsiStatQFull                    EQU        $28                    ; Queue full
  908. ;  SCSI messages
  909.  
  910. kCmdCompleteMsg                    EQU        0
  911. kExtendedMsg                    EQU        1                    ; 0x01
  912. kSaveDataPointerMsg                EQU        2                    ; 0x02
  913. kRestorePointersMsg                EQU        3                    ; 0x03
  914. kDisconnectMsg                    EQU        4                    ; 0x04
  915. kInitiatorDetectedErrorMsg        EQU        5                    ; 0x05
  916. kAbortMsg                        EQU        6                    ; 0x06
  917. kMsgRejectMsg                    EQU        7                    ; 0x07
  918. kNoOperationMsg                    EQU        8                    ; 0x08
  919. kMsgParityErrorMsg                EQU        9                    ; 0x09
  920. kLinkedCmdCompleteMsg            EQU        10                    ; 0x0a
  921. kLinkedCmdCompleteWithFlagMsg    EQU        11                    ; 0x0b
  922. kBusDeviceResetMsg                EQU        12                    ; 0x0c
  923. kAbortTagMsg                    EQU        13                    ; 0x0d
  924. kClearQueueMsg                    EQU        14                    ; 0x0e
  925. kInitiateRecoveryMsg            EQU        15                    ; 0x0f
  926. kReleaseRecoveryMsg                EQU        16                    ; 0x10
  927. kTerminateIOProcessMsg            EQU        17                    ; 0x11
  928. kSimpleQueueTag                    EQU        $20                    ; 0x20
  929. kHeadOfQueueTagMsg                EQU        $21                    ; 0x21
  930. kOrderedQueueTagMsg                EQU        $22                    ; 0x22
  931. kIgnoreWideResidueMsg            EQU        $23                    ; 0x23
  932.  
  933. ;  moveq #kSCSIx, D0;  _SCSIAtomic 
  934. ;
  935. ; pascal OSErr SCSIAction(SCSI_PB *parameterBlock)
  936. ;
  937.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  938.         ; parameters:
  939.         ;    parameterBlock  => A0
  940.         ; returns:
  941.         ;    OSErr           <= D0
  942.         Macro
  943.         _SCSIAction
  944.             moveq               #1,D0
  945.             dc.w                $A089
  946.         EndM
  947.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  948.         IMPORT_CFM_FUNCTION SCSIAction
  949.     ENDIF
  950.  
  951. ;
  952. ; pascal OSErr SCSIRegisterBus(SIMInitInfo *parameterBlock)
  953. ;
  954.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  955.         ; parameters:
  956.         ;    parameterBlock  => A0
  957.         ; returns:
  958.         ;    OSErr           <= D0
  959.         Macro
  960.         _SCSIRegisterBus
  961.             moveq               #2,D0
  962.             dc.w                $A089
  963.         EndM
  964.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  965.         IMPORT_CFM_FUNCTION SCSIRegisterBus
  966.     ENDIF
  967.  
  968. ;
  969. ; pascal OSErr SCSIDeregisterBus(SCSI_PB *parameterBlock)
  970. ;
  971.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  972.         ; parameters:
  973.         ;    parameterBlock  => A0
  974.         ; returns:
  975.         ;    OSErr           <= D0
  976.         Macro
  977.         _SCSIDeregisterBus
  978.             moveq               #3,D0
  979.             dc.w                $A089
  980.         EndM
  981.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  982.         IMPORT_CFM_FUNCTION SCSIDeregisterBus
  983.     ENDIF
  984.  
  985. ;
  986. ; pascal OSErr SCSIReregisterBus(SIMInitInfo *parameterBlock)
  987. ;
  988.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  989.         ; parameters:
  990.         ;    parameterBlock  => A0
  991.         ; returns:
  992.         ;    OSErr           <= D0
  993.         Macro
  994.         _SCSIReregisterBus
  995.             moveq               #4,D0
  996.             dc.w                $A089
  997.         EndM
  998.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  999.         IMPORT_CFM_FUNCTION SCSIReregisterBus
  1000.     ENDIF
  1001.  
  1002. ;
  1003. ; pascal OSErr SCSIKillXPT(SIMInitInfo *parameterBlock)
  1004. ;
  1005.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1006.         ; parameters:
  1007.         ;    parameterBlock  => A0
  1008.         ; returns:
  1009.         ;    OSErr           <= D0
  1010.         Macro
  1011.         _SCSIKillXPT
  1012.             moveq               #5,D0
  1013.             dc.w                $A089
  1014.         EndM
  1015.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1016.         IMPORT_CFM_FUNCTION SCSIKillXPT
  1017.     ENDIF
  1018.  
  1019.  
  1020.     ENDIF ; __SCSI__ 
  1021.  
  1022.